import { createRouter, createWebHashHistory } from 'vue-router'
import Layout from '@/Layout/Layout';

// 静态路由
export const constantRoutes = [
  {
    path: '/login',
    component: () => import('@/views/login/login'),
    hidden: true,
  },
  {
    path: '',
    component: Layout,
    redirect: '/index',
    children: [
      {
        path: '/index',
        component: () => import('@/views/index/index'),
        name: 'Index',
        meta: {
          title: '首页',
          icon: 'dashboard',
          affix: true
        },
      },
    ]
  },
]

// 动态路由，基于用户权限动态去加载
export const dynamicRoutes = [

]

const router = createRouter({
  history: createWebHashHistory(),
  routes: constantRoutes,
})

export default router;
